"use strict"

var __src = 'src';
var __build = 'build';

module.exports = {
    src: __src, 
    dest: __build, 
    browsersync: {
        /*
        ui: {
            port: 1985
        }, 
        server: {
            baseDir: [__build], 
            index: 'index.html'
        }, 
        */
        proxy: "localhost:8033/", //请替换成IIS服务器端口号
        files: [
            __build +'/css/**/*.css', 
            __build +'/images/**/*', 
            __build +'/js/**/*.js', 
            __build +'/html/**/*.html'
        ]
    }, 
    del: {
        src: __build +'/**/*'
    }, 
    styles: {
        src: __src +'/css', 
        src_sass: __src +'/css/sass', 
        dest: __build +'/css', 
        sassOptions: {
            outputStyle: 'compressed', 
			precision: 8
        }, 
        cssMinOptions: {
            inline: ['none'], 
            advanced: false, 
            aggressiveMerging: false, 
            compatibility: 'ie7', 
            keepBreaks: false, 
            keepSpecialComments: '*', 
            mediaMerging: true, 
            processImport: false
        }
    }, 
    images: {
        src:  __src +'/images', 
        dest: __build +'/images'
    }, 
    scripts: {
        src:  __src +'/js', 
        dest: __build +'/js', 
        uglifyOptions: {
            mangle: {
                toplevel: true, 
                except: [
                    'define', 
                    'require', 
                    'exports', 
                    'module', 
                    'moudles', 
                    '$'
                ]
            },  
            compress: {
                sequences: true, 
                properties: false, 
                dead_code: true, 
                drop_debugger: true, 
                unsafe: false, 
                conditionals: true, 
                comparisons: true, 
                evaluate: true, 
                booleans: true, 
                loops: true, 
                unused: true, 
                hoist_funs: true, 
                hoist_vars: true, 
                if_return: true, 
                join_vars: true, 
                cascade: true, 
                side_effects: true, 
                warnings: true, 
                global_defs: {}
            }, 
            preserveComments: 'some'
        }
    }, 
    html: {
        src: __src +'/html', 
        dest: __build +''
    }, 
    watch: {
        css: [
            __src +'/css/**/*.css', 
            '!'+ __src +'/css/sass', 
            '!'+ __src +'/css/sass/**/*.scss', 
        ], 
        sass: __src +'/css/sass/**/*.scss', 
        images: __src +'/images/**/*', 
        scripts: __src +'/js/**/*.js', 
        html:[ 
					__src +'/html/**/*',
					 '!'+ __src +'/html/tpl.*.html', 
				],
				commonPart: __src +'/html/tpl.*.html' 
    }
};